package com.gitee.huanminabc.db_freedom.segments;

import com.gitee.huanminabc.db_freedom.base.SqlFun;

public interface SqlSpecialSegments<Children, T, R> {
    //distinct
    Children DISTINCT();

    //括号左
    Children LEFT_BRACKET();

    //括号右
    Children RIGHT_BRACKET();

    //列
    Children S_COLUMN();

    <Y> Children S_COLUMN(SqlFun<Y, ?>... columns);

    <Y> Children S_COLUMN(SqlFun<Y, ?> column);

    <Y> Children S_COLUMN(SqlFun<Y, ?> column, String alias);

    //自定义列操作
    Children S_COLUMN_CUSTOM(String sql);

    Children S_COLUMN_CUSTOM(SqlFun<Children, Children> sql, String alias);


    //字段
    <Y> Children FIELD(SqlFun<Y, ?> column);

    //排序方式
    Children ASC();

    Children DESC();
}
